Importing bibtex with italics, superscript and subscript

I'm trying to switch to Zotero from Papers. I've exported my Papers library as bibtex.

Many of my papers have italics, superscript and/or subscript in the title. I can get the italics to render correctly by replacing all \emph{blah} instances in the bibtex with blah (although this is not valid bibtex AFAIK).

However, I can't do the same for superscript or subscript.

For example, the following bibtex entry (taken from the stackexchange tex site, http://tex.stackexchange.com/a/187030):

@article{goldbeter1990,
author = "A and B",
title = "Model for signal-induced {Ca$^{2+}$} and {IP$_3$} oscillations",
journal = "ABC",
volume = "87",
pages = "1-11",
year = "1990",
}

Is printed with a superscript '2+' and a trailing '$' when I generate a bibliography from Zotero. If I remove the trailing '$' from the bibtex, it is not rendered as superscript at all (Ca$^2+).

What is required for Zotero to parse subscript and superscript from bibtex during import?

I'm on Zotero 5.0 beta if that's relevant.

Thanks,

Tom
  • The whole thing without math mode (i.e. $$) imports fine for me, i.e.

    @article{goldbeter1990,
    author = "A and B",
    title = "Model for signal-induced {Ca^{2+}} and {IP_3} oscillations",
    journal = "ABC",
    volume = "87",
    pages = "1-11",
    year = "1990",
    }

    Is math mode even legal in bibtex? We could probably work around it if need be.
  • Thanks for the reply, but I'm afraid it doesn't work for me. I get Ca^2+ printed in the bibliography. I'm using Zotero 5.0 beta on Ubuntu 16.10.

    I believe math mode is supported in bibtex, see http://www.bibtex.org/SpecialSymbols/

    I've realised I can do it using the html "sub" tags like for italics, so I can replace those $^{blah}$ tags in the bibtex before importing.

    I'll give it a try with my full library using the html tags. I can live with it if it works, I just didn't expect to need html tags in the bibtex to get it to import correctly, and I can't find if that's documented anywhere.

    It also suprised me that Zotero handles some of the bibtex fine (e.g. $\alpha$, {\texttimes}) but not \emph{}. Is that expected?

    Thanks again for the help.
  • edited December 1, 2016
    Zotero uses html tags internally -- i.e. you should see them in Zotero -- but you really shouldn't need them in the bibtex. Could you run me through what exactly you're doing that produces Ca^2+ when importing the cleaned up version above?
  • Sure, here's my test.bibtex file contents:

    @article{goldbeter1990,
    author = "A and B",
    title = "Model for signal-induced {Ca$^{2+}$} and {IP_3} oscillations",
    journal = "ABC",
    volume = "87",
    pages = "1-11",
    year = "1990",
    }

    Go to Zotero, choose Actions -> Import, and select the test.bibtex file.

    After that item appears in the "test" subcollection in "My Library", I right-click and choose "Create Bibliography from Item". Then I select Citation Style: (doesn't matter, e.g. Cell) Output Mode: Bibliography and Output Method: Copy to Clipboard, and paste the result into e.g. LibreOffice Writer.
  • Sorry, that was the bibtex that results in the trailing $. For the verbatim Ca^2+ it's the bibtex you posted earlier.
  • edited December 1, 2016
    edit: nevermind, sorry, saw this after my post.
  • And it also imports into Zotero verbatim, i.e. you see no html tags after import?
  • edited December 1, 2016
    Correct. No html tags, although the braces are removed. Same thing happens with italics, e.g. \emph{text} would become \emphtext.
  • yeah, that all works correctly for me in the regular version, including \emph{} converting to <i> </i>. There's no real reason it should be different in the beta, but I can check next time I have that powered up. That's also on Ubuntu, so that's not a factor.

    In the meantime, could you check if you get a different result when you select and copy the bibtex above (either, btw. -- the version with math mode imports fine for me, too) and then select "import from clipboard" in Zotero?
  • Oh, and to be sure -- you're not running any add-ons in Zotero, are you?
  • Oh, that does change something. If I import the one with math mode from the clipboard, I get "sup" tags but the trailing $ is still present. If I import the one without math mode, I get verbatim (no tags).

    Can't get it to import the \emph correctly from the clipboard though.

    No add-ins, it's a new installation. I can trash the Zotero folder and start again if you think it's worth trying.
  • no, at this point I'll want to check this out in the beta before asking you to try anything else. Sorry about that -- as I said, normally this should all be smooth.
  • BBT will import this reference cleanly into `Model for signal-induced Ca<sup>2+</sup> and IP<sub>3</sub> oscillations`, but BBT is currently stuck in 4.0 land. I'm hoping the holidays will do something about that, but it's guaranteed not to happen before that.
Sign In or Register to comment.